-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
"Default branch: latest" does not exist Fix. #5547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
readthedocs/projects/forms.py
Outdated
@@ -246,7 +246,7 @@ def __init__(self, *args, **kwargs): | |||
# the special cases of LATEST and STABLE. | |||
all_versions_choices = [ | |||
(v.commit_name, v.verbose_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use verbose_name
for the id too now (commit_name was used only for the special cases of latest and stable). Also, we should add a test when the user has a version named latest
or stable
. Using commit_name
will make the test fail.
Something like 82944ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I'll Update the PR accordingly. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd What did you actually mean by this can you please clarify?
Using commit_name will make the test fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you write a test with a tag named latest
or stable
the current implementation will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, a version created by the user machine=False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd Updated the changes. but I'm Not sure I correctly understood what you meant about the tests. please have a look and let me know.
privacy_level=PUBLIC, | ||
identifier='ab96cbff71a8f40a4240aaf9d12e6c10', | ||
verbose_name='stable', | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a version named stable
is a specific test, we shouldn't merge it with the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd Okay 👍 . Updated the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are more explicit now, thanks
@stsewd Thanks for helping me. It was a Great Experience :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
closes #5390